]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Handle fullscreening from zero sized windows
authorRui Matos <tiagomatos@gmail.com>
Wed, 23 Nov 2016 14:35:03 +0000 (15:35 +0100)
committerRui Matos <tiagomatos@gmail.com>
Wed, 23 Nov 2016 17:43:11 +0000 (18:43 +0100)
Wayland clients can request their surfaces to be fullscreened before
commiting a buffer which means that we need to handle fullscreen
requests for which the old size is 0x0, preferably without warnings.

Since the mapping animation also runs for these windows, we can simply
bail out and ignore the fullscreen size change.

https://bugzilla.gnome.org/show_bug.cgi?id=770345

js/ui/windowManager.js

index 9864a1565d6e9764bb915e9af851d2a9c0c50f11..eb7716a0d52cc1c17ec345b9b9935c87b426ee03 100644 (file)
@@ -1256,8 +1256,9 @@ const WindowManager = new Lang.Class({
             return;
         }
 
-        if (whichChange == Meta.SizeChange.FULLSCREEN ||
-            whichChange == Meta.SizeChange.UNFULLSCREEN)
+        if ((whichChange == Meta.SizeChange.FULLSCREEN ||
+             whichChange == Meta.SizeChange.UNFULLSCREEN) &&
+            oldFrameRect.width > 0 && oldFrameRect.height > 0)
             this._fullscreenAnimation(shellwm, actor, oldFrameRect, whichChange);
         else
             shellwm.completed_size_change(actor);